<template>
	<view class="main-content">
		<view class="statement">
			<text>声明：该费用报价表仅供参考</text>
		</view>
		<scroll-view scroll-y class="list-box">
			<view class="detection-list frame">
				<text>{{records.device}}</text>
				<view v-for="(item,index) in records.deviceRenew" :key="index">
					<text>{{item.deviceRenewInfo}}</text>
					<text>￥{{item.deviceRenewMoney}}</text>
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	import Home from '@/api/home.js'
	export default {
		data() {
			return {
				records: {},
				requireId: ""
			}
		},
		onLoad(e) {
			this.requireId = e.id;
			this.getRecords();
		},
		methods: {
			getRecords() {
				Home.queryRepairReplaceRecords(36).then(res => {
					let {wbRepairApply, deviceRenewInfoDtos} = res.data;
					this.records = {
						id: wbRepairApply.id,
						device: wbRepairApply.device,
						deviceRenew: deviceRenewInfoDtos
					}
				})
			}
		}
	}
</script>

<style scoped lang="less">
	.main-content {
		width: 100%;
		height: 100%;
		.statement {
			padding: 12rpx 24rpx;
			border-radius: 10rpx;
			background: #f6f8fa;
			font-size: 24rpx;
			font-style: normal;
			font-weight: 400;
			line-height: 40rpx;
			color: #325EF5;
		}
		.list-box {
			padding: 20rpx 30rpx;
			background: #ffffff;
			height: calc(100vh - 64rpx);
			box-sizing: border-box;
			.detection-list {
				>text {
					display: block;
					padding: 20rpx 0;
					font-size: 28rpx;
					font-style: normal;
					font-weight: 500;
					line-height: 40rpx;
					opacity: 0.9;
				}

				view {
					margin-bottom: 20rpx;
					display: flex;
					justify-content: space-between;

					&:last-child {
						margin: 0;
					}

					text {
						&:first-child {
							font-size: 28rpx;
							font-style: normal;
							font-weight: 400;
							line-height: 40rpx;
							opacity: 0.6;
						}

						&:last-child {
							font-size: 28rpx;
							font-style: normal;
							font-weight: 400;
							line-height: 40rpx;
							opacity: 0.9;
						}
					}
				}
			}

		}
	}
</style>